package com.develop.collection.middle.sensors;

import com.develop.collection.util.Entry;
import com.develop.jdbc.jdbc.DataRow;
import com.develop.jdbc.jdbc.session.Session;
import com.develop.jdbc.jdbc.session.SessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * 评分计算
 *
 * @author fenny
 * @since 2019/08/19
 */
public class Sensors {

    private static final Logger log = LoggerFactory.getLogger(Sensors.class);

    private static final AtomicInteger SUCCESS_COUNT = new AtomicInteger();

    private static final AtomicInteger FILTER_COUNT = new AtomicInteger();

    private static final AtomicInteger CONVERT_COUNT = new AtomicInteger();

    /**
     * 事件_用户_产品_
     * 获取所有用户
     * 计算每个用户对应产品的评分
     * 写入txt
     */
    private static void execute() {
        log.info("begin-计算");
        Session pageSource = null;
        try {
            pageSource = SessionFactory.getSession("local-mysql");



        } catch (Exception e) {
            log.error("", e);
        } finally {
            if (pageSource != null) {
                pageSource.close();
            }
            log.info("end-计算");
        }
    }

    public static void main(String[] args) {
        Entry.entry(Sensors::execute);
    }

}
